<script type="text/javascript">
	$(function(){
		$.gritter.options = {
				time: 2000
			};
		<?php
			if(empty($this->notifications)){
				$this->notifications= array();
			}
			foreach ($this->notifications as $notification){
			?>
				$.gritter.add({
				    title: '<?= $notification->getTitle();?>',
				    text: '<?= $notification->getText();?>',
				    image: '<?php $notification->getImage();?>'
				});
			<?php
			}
			?>
	});
</script>